/*Write a C/C++ program that prints the sizes of the fundamental types, a few pointer types, and a few enumerations of your choice. Use the sizeof operator.*/
#include <iostream>
using namespace std;

int main(int argc, char const *argv[])
{
    bool b = false;
    bool *bptr = &b;
    short sh = 2;
    int i=2;
    int *iptr=&i;
    long int l=2147483647;
    char ch ='@'; 
    float f = 1.1;
    double d = 2.22;
    string str = "Hello World!";
    enum day {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}e = Tuesday;

    cout<< "__type__\t__value__\t__size__"<<endl;
    cout<<"bool\t\t"<<b<<"\t\t"<<sizeof(b)<<endl;
    cout<<"short\t\t"<<sh<<"\t\t"<<sizeof(sh)<<endl;
    cout<<"boolPTR\t\t"<<bptr<<"\t"<<sizeof(bptr)<<endl;
    cout<<"int\t\t"<<i<<"\t\t"<<sizeof(i)<<endl;
    cout<<"intPTR\t\t"<<iptr<<"\t"<<sizeof(iptr)<<endl;
    cout<<"long int\t"<<l<<"\t"<<sizeof(l)<<endl;
    cout<<"char\t\t"<<ch<<"\t\t"<<sizeof(ch)<<endl;
    cout<<"float\t\t"<<f<<"\t\t"<<sizeof(f)<<endl;
    cout<<"double\t\t"<<d<<"\t\t"<<sizeof(d)<<endl;
    cout<<"string\t\t"<<str<<"\t"<<sizeof(str)<<endl;
    cout<<"enum\t\t"<<e<<"\t\t"<<sizeof(e)<<endl;
    return 0;
}

